using System;
using System.Collections;
using UnityEngine;
namespace DefaultNamespace
{
    public class TestEnumerator:MonoBehaviour
    {
        private void Start()
        {
            // StartCoroutine(UseCustomEnumerator());
            StartCoroutine(new MyCustomEnumerator());
            
        }
        IEnumerator UseCustomEnumerator()
        {
            CustomEnumerator ce = new CustomEnumerator();
            
            while (ce.MoveNext())
            {
                Debug.Log("Current value: " + ce.Current);
                yield return null; // 每帧输出一个值
            }
        }
    }
    
}